import Vue from 'vue'
import Router from 'vue-router'
//首页路由
import Home from '@/components/common/Home'
//主页重定向路由
import index from '@/components/common/index'
//用户管理路由
import UserList from '@/components/pages/user/UserList'
//项目管理路由
import ProjectList from '@/components/pages/project/ProjectList'
import MyProject from '@/components/pages/project/MyProject'
import ProcessProject from '@/components/pages/project/ProcessProject'
import ShareProject from '@/components/pages/project/ShareProject'
//数据管理
import PersonItem from '@/components/pages/count/PersonItem'
import ItemCount from '@/components/pages/count/ItemCount'
import DataCount from '@/components/pages/count/DataCount'
//登录路由
import Login from '@/components/common/Login'
//系统管理路由
import SysUser from '@/components/pages/sys/SysUser'
import SysUserOnline from '@/components/pages/sys/SysUserOnline'
import SysRole from '@/components/pages/sys/SysRole'
import SysMenu from '@/components/pages/sys/SysMenu'
import SysLog from '@/components/pages/sys/SysLog'
import SysLogin from '@/components/pages/sys/SysLogin'
import SysNotices from '@/components/pages/sys/SysNotices'
import SysProject from '@/components/pages/sys/SysProject'
import SysDomain from '@/components/pages/sys/SysDomain'
import SysConfig from '@/components/pages/sys/SysConfig'
import SysVirtualLogin from '@/components/pages/sys/SysVirtualLogin'
//注册路由
import register from '@/components/common/register'
//个人中心
import PersonalData from '@/components/pages/Personal/PersonalData'
import UpdatePassword from '@/components/pages/Personal/UpdatePassword'
//好友列表
import FriendList from '@/components/pages/Friend/FriendList'
import ApplicationList from '@/components/pages/Friend/ApplicationList'
import ApplicationLog from '@/components/pages/Friend/ApplicationLog'
//系统工具
// import generator from '@/components/pages/tool/generator/index'
import swagger from '@/components/pages/tool/swagger/index'

Vue.use(Router)

export default new Router({
  routes: [
    {//主页
      path: '/Home',
      component: Home,
      redirect: '/',
      children: [
        {//主页重定向
          path: '/Home',
          name: 'index',
          component: index
        },
        {//个人资料
          path: '/PersonalData',
          name: 'PersonalData',
          component: PersonalData
        },
        {//修改密码
          path: '/UpdatePassword',
          name: 'UpdatePassword',
          component: UpdatePassword
        },
        {//用户管理
          path: '/SysUser',
          name: 'SysUser',
          component: SysUser
        },
        {//在线用户
          path: '/SysUserOnline',
          name: 'SysUserOnline',
          component: SysUserOnline
        },
        {//角色管理
          path: '/SysRole',
          name: 'SysRole',
          component: SysRole
        },
        {//菜单管理
          path: '/SysMenu',
          name: 'SysMenu',
          component: SysMenu
        },
        {//日志管理
          path: '/SysLog',
          name: 'SysLog',
          component: SysLog
        },
        {//登录记录
          path: '/SysLogin',
          name: 'SysLogin',
          component: SysLogin
        },
        {//实体列表
          path: '/SysDomain',
          name: 'SysDomain',
          component: SysDomain
        },
        {//参数管理
          path: '/SysConfig',
          name: 'SysConfig',
          component: SysConfig
        },
        {//虚拟登录
          path: '/SysVirtualLogin',
          name: 'SysVirtualLogin',
          component: SysVirtualLogin
        },
        {//系统公告
          path: '/SysNotices',
          name: 'SysNotices',
          component: SysNotices
        },
        {//用户管理
          path: '/UserList',
          name: 'UserList',
          component: UserList
        },
        {//项目统计
          path: '/ItemCount',
          name: 'ItemCount',
          component: ItemCount
        },
        {//数据统计
          path: '/DataCount',
          name: 'DataCount',
          component: DataCount
        },
        {//用户的可以搜到的所有项目（没有删除键）
          path: '/ProjectList',
          name: 'ProjectList',
          component: ProjectList
        },
        {//我的项目
          path: '/MyProject',
          name: 'MyProject',
          component: MyProject
        },
        {//审核项目
          path: '/ProcessProject',
          name: 'ProcessProject',
          component: ProcessProject
        },
        {//分配项目
          path: '/ShareProject',
          name: 'ShareProject',
          component: ShareProject
        },
        {//项目统计
          path: '/SysProject',
          name: 'SysProject',
          component: SysProject
        },
        {//个人项目统计
          path: '/PersonItem',
          name: 'PersonItem',
          component: PersonItem
        },
        {//好友列表
          path: '/FriendList',
          name: 'FriendList',
          component: FriendList
        },
        {//申请列表
          path: '/ApplicationList',
          name: 'ApplicationList',
          component: ApplicationList
        },
        {//申请记录
          path: '/ApplicationLog',
          name: 'ApplicationLog',
          component: ApplicationLog
        },
        // {//文件生成
        //   path: '/generator',
        //   name: 'generator',
        //   component: generator
        // },
        {//接口文档
          path: '/swagger',
          name: 'swagger',
          component: swagger
        }
      ]
    },
    {//登录
      path: '/',
      name: 'login',
      component: Login,
    },
    {//注册
      path: '/register',
      name: 'register',
      component: register,
    },
  ]
})
